Opened 15 years ago

Closed 12 years ago

#310 closed enhancement (fixed)

port ST_DumpPoints() to C

Reported by: kneufeld Owned by: pramsey
Priority: medium Milestone: PostGIS 2.1.0
Component: postgis Version: master
Keywords: Cc: bitner, nw@…

Description

The current implementation of ST_DumpPoints is in plpgsql - as such it doesn't scale well.

At some point, this function should be ported to C, mimicking ST_Dump.

Change History (6)

comment:1 by bitner, 14 years ago

Cc: bitner added

Hacky test that shows potential performance gain by getting away from the plpgsql looping structure with npoints. Dumping a 2600 point linestring takes almost a second with st_dumppoints and ~30ms with this function.

CREATE OR REPLACE FUNCTION dump_linestring_points(geometry) RETURNS SETOF geometry AS $BODY$ SELECT

(

'SRID=' bar ';POINT(' foo

')' )::geometry

FROM

regexp_split_to_table(

rtrim(

substring(asewkt($1) from 23) ,')'

), ','

) as foo , srid($1) as bar

WHERE st_geometrytype($1)='ST_LineString'; $BODY$ LANGUAGE sql IMMUTABLE STRICT COST 1 ROWS 100;

comment:2 by strk, 13 years ago

Milestone: PostGIS FuturePostGIS 2.0.1
Owner: changed from pramsey to strk
Status: newassigned

I don't think there's a problem in doing this for 2.0.X, right ?

comment:3 by robe, 13 years ago

no problem as long as we don't change the front-facing api

comment:4 by robe, 13 years ago

Milestone: PostGIS 2.0.1PostGIS 2.1.0

comment:5 by robe, 12 years ago

Cc: nw@… added
Owner: changed from strk to pramsey
Priority: lowmedium
Status: assignednew

Nathan said he was interested in doing this. Adding him to cc so he can add his patch to this ticket. pramsey I believe was going to act as mentor

http://www.postgis.org/pipermail/postgis-devel/2012-September/022009.html

comment:6 by pramsey, 12 years ago

Resolution: fixed
Status: newclosed

Committed Nathan Wagner's implementation at r10595

Note: See TracTickets for help on using tickets.